<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.prime.com.tr/ui"
      xmlns:c="http://java.sun.com/jsp/jstl/core">
    <h:head>
        <title>Purchase Order</title>
    </h:head>
    <f:view beforePhase="#{UserDisplayManagedBean.doDisplay}">
        <f:view beforePhase="#{PurchaseOrderManagedBean.convertedInitView}">
            <h:body>
                <h:form prependId="false">
                    <!-- IDLE DIALOG for -->
                    <p:confirmDialog message="You have been idle for 5 minutes. Do you want to continue?"  
                                     showEffect="bounce" hideEffect="explode"  
                                     header="Warning message" severity="alert" widgetVar="confirmation">  
                        <p:commandButton value="Yes" onclick="confirmation.hide()" type="button" /> 
                        <p:commandButton value="No" update="panel" oncomplete="confirmation.hide()"  
                                         actionListener="#{UserManagedBean.doLogout}" /> 
                    </p:confirmDialog>

                    <p:idleMonitor timeout="300000" onidle="confirmation.show()" />  
                    <!--END OF IDLE DIALOG-->

                    <p:growl id="msgs" showDetail="true"/>
                    <p:growl id="notif" showDetail="true"/>
                    <div id="top" class="top">
                        <h:graphicImage value="/image/newHeader.jpg"/>
                    </div>
                    <div id="content">
                        <p:poll interval="5"   
                                actionListener="#{MessageManagedBean.checkNewMessage}" immediate="true" update="notif" />
                        <table>
                            <tr>
                                <td>
                                    <p:toolbar style="font-size:12px;margin-top:0%;height:30px;width:200px"> 
                                        <p:toolbarGroup align="right" >
                                            <p:button title="Home" image="ui-icon-home" outcome="SalesDeptWorkspace"/>                                  
                                            <p:button title="Notes" image="ui-icon-note" outcome="tasks"/>                                    
                                            <p:button title="Mail" outcome="messages" image="ui-icon-mail-closed"/>                                    
                                            <p:button title="Edit Preferences" image="ui-icon-gear"/>                                   
                                            <p:button title="Help" image="ui-icon-help"/>
                                            <p:commandButton title="Log Out" immediate="true" type="submit" image="ui-icon-close" actionListener="#{UserManagedBean.doLogout}"/> 
                                        </p:toolbarGroup>
                                    </p:toolbar></td>
                                <td>
                                    <h:graphicImage value="8522350.png" style="width:40px;height:40px" />
                                    <h:outputText value="         "/>
                                    <h:outputText value="Converted Purchase Orders" style="font-family:Tahoma;font-size:20px;font-weight:bolder"/>
                                    <p:spacer width="100" height="10"/>
                                </td>
                            </tr>
                            <tr>
                                <td style="vertical-align:top">
                                    <p:menu style="width:200px;font-size: 12px;font-family: Tahoma;border-style: ridge">  
                                        <p:submenu label="Sales Force Automation" >  
                                            <p:menuitem value="Customers" url="http://localhost:8080/MerlionERP-war/CRM/customers.xhtml" ajax="false" icon="ui-icon ui-icon-person"/>  
                                            <p:menuitem value="Contacts" url="http://localhost:8080/MerlionERP-war/CRM/contacts.xhtml" ajax="false" icon="ui-icon ui-icon-person" />
                                            <p:menuitem value="Leads" url="http://localhost:8080/MerlionERP-war/CRM/salesLeads.xhtml" ajax="false" icon="ui-icon ui-icon-person" />
                                        </p:submenu>
                                        <p:submenu label="Sales Order Processing">
                                            <p:menuitem value="Pricebooks" url="http://localhost:8080/MerlionERP-war/CRM/pricebooks.xhtml" ajax="false" icon="ui-icon ui-icon-document"/>
                                            <p:menuitem value="Inquiries" url="http://localhost:8080/MerlionERP-war/CRM/salesInquiries.xhtml" ajax="false" icon="ui-icon ui-icon-document"/>
                                            <p:menuitem value="Quotations" url="http://localhost:8080/MerlionERP-war/CRM/quotations.xhtml" ajax="false" icon="ui-icon ui-icon-document"/>
                                            <p:menuitem value="Purchase Orders" url="http://localhost:8080/MerlionERP-war/CRM/purchaseOrders.xhtml" ajax="false" icon="ui-icon ui-icon-document"/>
                                            <p:menuitem value="Sales Orders" url="http://localhost:8080/MerlionERP-war/CRM/salesOrders.xhtml" ajax="false" icon="ui-icon ui-icon-document"/>
                                            <p:menuitem value="Delivery Orders" url="http://localhost:8080/MerlionERP-war/CRM/deliveryOrdersCRM.xhtml" ajax="false" icon="ui-icon ui-icon-document"/>
                                        </p:submenu>  
                                    </p:menu>
                                    <p:menu type="tiered" style="width:200px;font-family:Tahoma;font-size:12px">
                                        <p:submenu label="Create New" icon="ui-icon ui-icon-extlink">  
                                            <p:menuitem value="Customer" url="http://localhost:8080/MerlionERP-war/CRM/createNewCustomer.xhtml" />
                                            <p:menuitem value="Sales Lead" url="http://localhost:8080/MerlionERP-war/CRM/createNewSalesLead.xhtml" /> 
                                            <p:menuitem value="Contact" url="http://localhost:8080/MerlionERP-war/CRM/createNewContact.xhtml" />
                                            <p:menuitem value="Inquiry" url="http://localhost:8080/MerlionERP-war/CRM/addSalesInquiry.xhtml"/>
                                            <p:menuitem value="Quotation" url="http://localhost:8080/MerlionERP-war/CRM/addQuotation.xhtml"/>
                                            <p:menuitem value="Purchase Order" url="http://localhost:8080/MerlionERP-war/CRM/addPurchaseOrder.xhtml"/>
                                            <p:menuitem value="Sales Order" url="http://localhost:8080/MerlionERP-war/CRM/addSalesOrder.xhtml"/>
                                            <p:menuitem value="Delivery Order" url="http://localhost:8080/MerlionERP-war/CRM/addDeliveryOrder.xhtml"/>      
                                        </p:submenu>
                                    </p:menu>
                                    <p:calendar mode="inline" style="font-size:11px;font-family:Tahoma"/>
                                </td>

                                <td style="vertical-align:top">

                                    <p:toolbar style="background-color:  #d9bb73;font-size: 70%;width:99.5%"> 

                                        <!--<p:toolbarGroup align="left">  
                                            <h:outputLabel value="Search:"/>
                                            <h:inputText value="" id="search"/>
        
                                        </p:toolbarGroup>--> 
                                        <!--<p:divider />-->
                                        <p:toolbarGroup align="left">  
                                            <p:button value="New Purchase Order" outcome="addPurchaseOrder" image="ui-icon-plus"/>
                                            <p:commandButton value="Delete" title="Delete" image="ui-icon ui-icon-trash" oncomplete="deleteDialog.show()"/>                                   

                                            <!-- <p:divider />  
                                             <p:commandButton type="push" title="Save" image="ui-icon-disk"/>  
                                             <p:commandButton type="push" title="Delete" image="ui-icon-trash"/>  
                                             <p:commandButton type="push" title="Print" image="ui-icon-print"/> -->
                                        </p:toolbarGroup>  

                                    </p:toolbar> 

                                    <p:dataTable id="panel" 
                                                 var="purchaseOrders" value="#{PurchaseOrderManagedBean.convertedPurchaseOrders}"                       
                                                 paginator="true" rows="5"  
                                                 paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"  
                                                 rowEditListener="#{PurchaseOrderManagedBean.onEditRow}"
                                                 rowsPerPageTemplate="5,10,15"  style="font-size:60%;width:100%"
                                                 selection="#{PurchaseOrderManagedBean.selectedPurchaseOrders}"
                                                 emptyMessage="No data found with given criteria" widgetVar="purchaseOrderTable">  

                                        <f:facet name="header">                           
                                            <p:outputPanel style="text-align:right"  >
                                                <h:outputText value="Search all fields:" style="margin-left:840px" />  
                                                <p:inputText id="globalFilter" onkeyup="purchaseOrderTable.filter()" style="right:-100px;width:150px" />  
                                            </p:outputPanel>
                                        </f:facet> 

                                        <p:column selectionMode="multiple"/> <!--style="border-right-color:transparent"/>-->

                                        <p:column headerText="View" style="width:20px;border-right-color:transparent">  
                                            <p:rowToggler />  
                                        </p:column>


                                        <p:column headerText="Del." style="width: 16px;border-left-color:transparent">
                                            <!--DELETE-->
                                            <p:commandButton title="Delete" image="ui-icon ui-icon-trash" ajax="true" immediate="true"
                                                             update="panel" oncomplete="customerdialog.show()">
                                                <f:setPropertyActionListener target="#{PurchaseOrderManagedBean.selectedPurchaseOrder}"
                                                                             value="#{purchaseOrders}"/>
                                            </p:commandButton>
                                        </p:column>



                                        <!--Purchase Order ID-->
                                        <p:column sortBy="#{purchaseOrders.id}" filterBy="#{purchaseOrders.id}" 
                                                  filterMatchMode="contains" filterStyle="width:50px"> 
                                            <!--style="border-left-color:transparent;border-right-color:transparent">-->
                                            <f:facet name="header">
                                                <h:outputText value="ID"/>
                                            </f:facet>
                                            <h:outputText value="#{purchaseOrders.id}"/>
                                        </p:column>

                                        <!--DATE ISSUED-->
                                        <p:column headerText="Date Issued" sortBy="#{purchaseOrders.dateIssued}" 
                                                  filterBy="#{purchaseOrders.dateIssued}" filterMatchMode="contains">
                                            <!--style="border-left-color:transparent;border-right-color:transparent">-->  

                                            <h:outputText value="#{purchaseOrders.dateIssued}" />  

                                        </p:column>   


                                        <!--CLIENT NAME-->
                                        <p:column headerText="Client Name" sortBy="#{purchaseOrders.clientName}" 
                                                  filterBy="#{purchaseOrders.clientName}" filterMatchMode="contains"
                                                  filterStyle="width:80px"> 
                                            <!--style="border-left-color:transparent;border-right-color:transparent">-->
                                            <h:outputText value="#{purchaseOrders.clientName}"/>
                                        </p:column>



                                        <!--Total Price-->
                                        <p:column headerText="Total Price" sortBy="#{purchaseOrders.totalPrice}" 
                                                  filterBy="#{purchaseOrders.totalPrice}" filterMatchMode="contains"
                                                  filterStyle="width:60px"> 
                                            <!-- style="border-left-color:transparent;border-right-color:transparent">-->
                                            <h:outputText value="#{purchaseOrders.totalPrice}"/>
                                        </p:column>



                                        <!--STATUS-->
                                        <p:column headerText="Status" sortBy="#{purchaseOrders.status}" 
                                                  filterBy="#{purchaseOrders.status}" filterMatchMode="contains">
                                            <!--style="border-left-color:transparent;border-right-color:transparent">-->


                                            <h:outputText value="#{purchaseOrders.status}"/>

                                        </p:column>

                                        <!--QUOTATION ID-->
                                        <p:column headerText="Quotation ID" sortBy="#{purchaseOrders.quotationID}" 
                                                  filterBy="#{purchaseOrders.quotationID}" filterMatchMode="contains"
                                                  filterStyle="width:60px"> 
                                            <!--style="border-left-color:transparent;border-right-color:transparent"> --> 

                                            <h:outputText value="#{purchaseOrders.quotationID}" />  
                                        </p:column>   

                                        <p:column style="width:30px"> <!--"border-left-color:transparent;border-right-color:transparent">-->  
                                            <p:commandLink update="display1" oncomplete="poDialog.show()" title="Edit Details">
                                                <p:graphicImage value="about_icon.png" style="width:20px;height:20px"/>
                                                <f:setPropertyActionListener value="#{purchaseOrders}" target="#{PurchaseOrderManagedBean.selectedViewPurchaseOrder}" />  
                                                <f:setPropertyActionListener value="#{true}" target="#{PurchaseOrderManagedBean.editMode}" />  
                                            </p:commandLink>                                                                
                                        </p:column>



                                        <p:rowExpansion>  
                                            <h:panelGrid id="display" columns="3" cellpadding="3"
                                                         style="font-family:Tahoma; font-size:10px;border-color:transparent;column-rule-style:hidden">

                                                <h:outputText value="Purchase Order Id" />  
                                                <h:outputText value=":"/>
                                                <h:outputText value="#{purchaseOrders.id}" />

                                                <h:outputText value="Date Issued" />  
                                                <h:outputText value=":"/>
                                                <h:outputText value="#{purchaseOrders.dateIssued}" />  

                                                <h:outputText value="Client Id" />
                                                <h:outputText value=":"/>
                                                <h:outputText value="#{purchaseOrders.clientId}" /> 

                                                <h:outputText value="Client Name" />
                                                <h:outputText value=":"/>
                                                <h:outputText value="#{purchaseOrders.clientName}" />

                                                <h:outputText value="Shipping Address" />
                                                <h:outputText value=":"/>
                                                <h:outputText value="#{purchaseOrders.shippingStreet}" />

                                                <h:outputText value="Billing Address" />
                                                <h:outputText value=":"/>
                                                <h:outputText value="#{purchaseOrders.billingStreet}" />

                                                <h:outputText value="Indicative Lead Time" />
                                                <h:outputText value=":"/>
                                                <h:outputText value="#{purchaseOrders.leadTime}" />

                                                <h:outputText value="Status" />
                                                <h:outputText value=":"/>
                                                <h:outputText value="#{purchaseOrders.status}" />

                                                <h:outputText value="Description" />
                                                <h:outputText value=":"/>
                                                <h:outputText value="#{purchaseOrders.description}" />

                                                <h:outputText value="Total Price" />
                                                <h:outputText value=":"/>
                                                <h:outputText value="#{purchaseOrders.totalPrice}" />

                                                <h:outputText value="Quotation ID" />
                                                <h:outputText value=":"/>
                                                <h:outputText value="#{purchaseOrders.quotationID}" />

                                            </h:panelGrid>  
                                        </p:rowExpansion> 


                                    </p:dataTable>  


                                    <p:ajaxStatus style="width:16px;height:16px;">  
                                        <f:facet name="start">  
                                            <h:graphicImage value="25(2).gif" />  
                                        </f:facet>  

                                        <f:facet name="complete">  
                                            <h:outputText value="" />  
                                        </f:facet>  
                                    </p:ajaxStatus> 

                                    <p:dialog header="Purchase Order Detail" widgetVar="poDialog" resizable="false"  
                                              width="900" >  

                                        <h:panelGrid id="display1" columns="6" cellpadding="1" cellspacing="1" style="font-family:Tahoma;font-size:11px" >  

                                            <h:outputText value="ID" style="font-weight:bold"/> 
                                            <h:outputText value=":"/>
                                            <h:outputText value="#{PurchaseOrderManagedBean.selectedViewPurchaseOrder.id}" />  

                                            <h:outputText value="Purchase Order Name" style="font-weight:bold"/> 
                                            <h:outputText value=":"/>
                                            <h:panelGroup>
                                                <h:outputText value="#{PurchaseOrderManagedBean.selectedViewPurchaseOrder.documentName}"
                                                              style="font-weight:bold"/>  
                                            </h:panelGroup>

                                            <h:outputText value="Date Issued" style="font-weight:bold"/>
                                            <h:outputText value=":"/>
                                            <h:outputText value="#{PurchaseOrderManagedBean.selectedViewPurchaseOrder.dateIssued}"/>

                                            <h:outputText value="Date Due" style="font-weight:bold"/>
                                            <h:outputText value=":"/>
                                            <h:panelGroup>
                                                <h:outputText value="#{PurchaseOrderManagedBean.selectedViewPurchaseOrder.dueDate}"
                                                              style="font-weight:bold"/>

                                            </h:panelGroup>

                                            <h:outputText value="Client ID" style="font-weight:bold"/> 
                                            <h:outputText value=":"/>                                  
                                            <h:outputText value="#{PurchaseOrderManagedBean.selectedViewPurchaseOrder.clientId}" />  

                                            <h:outputText value="Client Name" style="font-weight:bold"/>
                                            <h:outputText value=":"/>
                                            <h:outputText value="#{PurchaseOrderManagedBean.selectedViewPurchaseOrder.clientName}" />  

                                            <h:outputText value="Shipping Street" style="font-weight:bold"/> 
                                            <h:outputText value=":"/>
                                            <h:panelGroup>  
                                                <h:outputText value="#{PurchaseOrderManagedBean.selectedViewPurchaseOrder.shippingStreet}" style="font-weight:bold"/>  
                                            </h:panelGroup>  

                                            <h:outputText value="Billing Street" style="font-weight:bold"/> 
                                            <h:outputText value=":"/>
                                            <h:panelGroup>  
                                                <h:outputText value="#{PurchaseOrderManagedBean.selectedViewPurchaseOrder.billingStreet}" style="font-weight:bold"/>  
                                            </h:panelGroup>

                                            <h:outputText value="Shipping State" style="font-weight:bold"/> 
                                            <h:outputText value=":"/>
                                            <h:panelGroup>  
                                                <h:outputText value="#{PurchaseOrderManagedBean.selectedViewPurchaseOrder.shippingState}" style="font-weight:bold"/>  
                                            </h:panelGroup>  

                                            <h:outputText value="Billing State" style="font-weight:bold"/> 
                                            <h:outputText value=":"/>
                                            <h:panelGroup>  
                                                <h:outputText value="#{PurchaseOrderManagedBean.selectedViewPurchaseOrder.billingState}" style="font-weight:bold"/>  
                                            </h:panelGroup>

                                            <h:outputText value="Shipping City" style="font-weight:bold"/> 
                                            <h:outputText value=":"/>
                                            <h:panelGroup>  
                                                <h:outputText value="#{PurchaseOrderManagedBean.selectedViewPurchaseOrder.shippingCity}" style="font-weight:bold" />  
                                            </h:panelGroup>  

                                            <h:outputText value="Billing City" style="font-weight:bold"/> 
                                            <h:outputText value=":"/>
                                            <h:panelGroup>  
                                                <h:outputText value="#{PurchaseOrderManagedBean.selectedViewPurchaseOrder.billingCity}" style="font-weight:bold"/>  
                                            </h:panelGroup>  

                                            <h:outputText value="Shipping Code" style="font-weight:bold"/> 
                                            <h:outputText value=":"/>
                                            <h:panelGroup>  
                                                <h:outputText value="#{PurchaseOrderManagedBean.selectedViewPurchaseOrder.shippingCode}" style="font-weight:bold" />  
                                            </h:panelGroup>  

                                            <h:outputText value="Billing Code" style="font-weight:bold"/> 
                                            <h:outputText value=":"/>
                                            <h:panelGroup>  
                                                <h:outputText value="#{PurchaseOrderManagedBean.selectedViewPurchaseOrder.billingCode}" style="font-weight:bold"/>  
                                            </h:panelGroup>  

                                            <h:outputText value="Shipping Country" style="font-weight:bold"/> 
                                            <h:outputText value=":"/>
                                            <h:panelGroup>  
                                                <h:outputText value="#{PurchaseOrderManagedBean.selectedViewPurchaseOrder.shippingCountry}" style="font-weight:bold"/>  
                                            </h:panelGroup>  

                                            <h:outputText value="Billing Country" style="font-weight:bold"/> 
                                            <h:outputText value=":"/>
                                            <h:panelGroup>  
                                                <h:outputText value="#{PurchaseOrderManagedBean.selectedViewPurchaseOrder.billingCountry}" style="font-weight:bold"/>  
                                            </h:panelGroup> 

                                            <h:outputText value="Shipping Method" style="font-weight:bold"/> 
                                            <h:outputText value=":"/>
                                            <h:panelGroup>  
                                                <h:outputText value="#{PurchaseOrderManagedBean.selectedViewPurchaseOrder.shippingMethod}" style="font-weight:bold" />  

                                            </h:panelGroup>  

                                            <h:outputText value="Shipping Rule" style="font-weight:bold"/> 
                                            <h:outputText value=":"/>
                                            <h:panelGroup>  
                                                <h:outputText value="#{PurchaseOrderManagedBean.selectedViewPurchaseOrder.shippingRule}" style="font-weight:bold" />  

                                            </h:panelGroup>

                                            <h:outputText value="Freight Cost Rule" style="font-weight:bold"/> 
                                            <h:outputText value=":"/>
                                            <h:panelGroup>  
                                                <h:outputText value="#{PurchaseOrderManagedBean.selectedViewPurchaseOrder.freightCostRule}" style="font-weight:bold" />
                                            </h:panelGroup>
                                            <h:outputText value=""/>
                                            <h:outputText value=""/>
                                            <h:outputText value=""/>


                                            <h:outputText value="Payment Method" style="font-weight:bold"/> 
                                            <h:outputText value=":"/>
                                            <h:panelGroup>  
                                                <h:outputText value="#{PurchaseOrderManagedBean.selectedViewPurchaseOrder.paymentMethod}" style="font-weight:bold" />

                                            </h:panelGroup>  

                                            <h:outputText value="Invoice Rule" style="font-weight:bold"/> 
                                            <h:outputText value=":"/>
                                            <h:panelGroup>  
                                                <h:outputText value="#{PurchaseOrderManagedBean.selectedViewPurchaseOrder.invoiceRule}" style="font-weight:bold"/>
                                            </h:panelGroup>

                                            <h:outputText value="Currency" style="font-weight:bold"/>
                                            <h:outputText value=":"/>
                                            <h:panelGroup>
                                                <h:outputText value="#{PurchaseOrderManagedBean.selectedViewPurchaseOrder.currency}" style="font-weight:bold" />
                                            </h:panelGroup>


                                            <h:outputText value="Status" style="font-weight:bold"/>
                                            <h:outputText value=":"/>
                                            <h:panelGroup>
                                                <h:outputText value="#{PurchaseOrderManagedBean.selectedViewPurchaseOrder.status}" style="font-weight:bold"/>

                                            </h:panelGroup>


                                            <h:outputText value="Total Price" style="font-weight:bold"/>
                                            <h:outputText value=":"/>
                                            <h:outputText value="#{PurchaseOrderManagedBean.selectedViewPurchaseOrder.totalPrice}"/>


                                            <h:outputText value="Quotation ID" style="font-weight:bold"/>
                                            <h:outputText value=":"/>
                                            <h:outputText value="#{PurchaseOrderManagedBean.selectedViewPurchaseOrder.quotationID}"/>

                                            <h:outputText value="Description" style="font-weight:bold"/> 
                                            <h:outputText value=":"/>
                                            <h:panelGroup>  
                                                <h:outputText value="#{PurchaseOrderManagedBean.selectedViewPurchaseOrder.description}" style="font-weight:bold"/>  
                                            </h:panelGroup>
                                            <h:outputText value=""/>
                                            <h:outputText value=""/>
                                            <h:outputText value=""/>

                                            <p:dataTable id="childPanel" value="#{PurchaseOrderManagedBean.selectedProductList}"
                                                         var="lineEntry" style="width:200px">
                                                <p:column headerText="Product ID">
                                                    <h:outputText value ="#{lineEntry.itemId}"/>
                                                </p:column>

                                                <p:column headerText="Product Name">
                                                    <h:outputText value="#{lineEntry.itemName}"/>
                                                </p:column>

                                                <p:column headerText="Quantity">
                                                    <h:outputText value="#{lineEntry.quantity}"/>
                                                </p:column>

                                                <p:column headerText="Unit Base Price">
                                                    <h:outputText value="#{lineEntry.basePrice}"/>
                                                </p:column>

                                                <p:column headerText="Price">
                                                    <h:outputText value="#{lineEntry.price}"/>

                                                </p:column>



                                                <p:column headerText="Total Price">
                                                    <h:outputText value="#{lineEntry.totalPrice}"/>
                                                </p:column>


                                                <p:column headerText="Indicative Lead Time" style="width:60px" >

                                                    <h:outputText value="#{lineEntry.indicativeLeadTime}"/>
                                                </p:column>
                                            </p:dataTable>

                                            <h:outputText value=""/>
                                            <h:outputText value=""/>
                                            <h:outputText value=""/>
                                            <h:outputText value=""/>
                                            <h:outputText value=""/>

                                            <h:outputText value=""/>
                                            <h:outputText value=""/>
                                            <h:outputText value=""/>
                                            <h:outputText value=""/>

                                        </h:panelGrid>
                                    </p:dialog>

                                    <!--DIALOG FOR DELETING A  SINGLE ROW-->
                                    <p:confirmDialog message="Are you sure you want to delete this purchase order?"  
                                                     showEffect="blind" hideEffect="explode"  
                                                     header="Delete Purchase Order" severity="alert" widgetVar="customerdialog">  
                                        <center>
                                            <p:commandButton value="Yes" update="panel" ajax="true" immediate="true" oncomplete="customerdialog.hide()"  
                                                             actionListener="#{PurchaseOrderManagedBean.delete}" />  
                                            <p:commandButton value="No" onclick="customerdialog.hide()" type="button" />   
                                        </center>

                                    </p:confirmDialog>  


                                    <!--DIALOG FOR DELETING MULTIPLE ROW OF PURCHASE ORDERS-->
                                    <p:dialog header="Delete Selected Records" modal="true" widgetVar="deleteDialog">

                                        <h:outputText value="You are about to permanently delete records." /><br /><br />
                                        <h:outputText value="Are you sure you want to continue?" /><br /><br/>

                                        <center>
                                            <p:commandButton value="Yes" ajax="true" immediate="true" update="panel" 
                                                             oncomplete="deleteDialog.hide()" actionListener="#{PurchaseOrderManagedBean.deletePurchaseOrders}" />
                                            <p:commandButton value="No" oncomplete="deleteDialog.hide()" action="#{PurchaseOrderManagedBean.cancelDelete()}" /> 

                                        </center>
                                    </p:dialog>


                                </td>
                            </tr>
                        </table>

                    </div>
                    <div id="bottom" class="bottom">
                        <h:graphicImage value="/image/merlionfooter.jpg"/>
                    </div>
                </h:form>
            </h:body>
        </f:view>
    </f:view>
</html>